package example.controller;

import example.client.NacosClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 李俊
 * @Description
 * @Date 2021/7/14 16:02
 */
@RestController
public class NacosController {


    @Value("${spring.application.name}")
    private String appName;


    @Autowired
    private NacosClient nacosClient;


    @GetMapping("/echo/app-name")
    public String echoAppName2() {

        return nacosClient.echo(appName);
    }

}
